Skip to main content

Mark Notifications Read

PATCH /notifications/read

Description

Marks selected notifications as read, or marks every unread notification as read.

Request Parameters

Requires Authentication: true

BODY

NameTypeRequiredDescription
idsstring[]NoNotification IDs to mark as read. Required unless all is true.
allbooleanNoWhen true, marks every unread notification as read.

Usage Example

await axios.patch(
"https://api.daykeeper.app/notifications/read",
{
ids: ["67d9d8abcc9e4db02fca3001"]
},
{
headers: {
Authorization: `Bearer ${accessToken}`,
},
}
)

Success Response

{
"message": "notifications updated successfully",
"matched": 1,
"modified": 1,
"unreadCount": 3,
"hasUnread": true
}

Error Response

CodeDescription
400ids missing when all is not true
401Missing or invalid access token
500Server error